package com.example.jpademo.ref.generate.enums;

/**
 * @author guoxh
 * @date 2020-08-31 00:02:47
 */
public enum CommonDelReferSQL {

    DELETE_BILLENTITY_BASE("delete from billentity_base where iBillId in (select id from bill_base where cBillNo='%s' and tenant_id='%s')"),
    DELETE_BILLTEMPLATE_BASE("delete from billtemplate_base where iBillId in (select id from bill_base where cBillNo='%s' and tenant_id='%s')"),
    DELETE_BILLTMP_BASE("delete from billtplgroup_base where iBillId in (select id from bill_base where cBillNo='%s' and tenant_id='%s' )"),
    DELETE_BILLITEM_BASE("delete from billitem_base where iBillId in (select id from bill_base where cBillNo='%s' and tenant_id='%s' )"),
    //DELETE_PUB_MAKEBILLRULE_DETAIL("delete from pub_makebillrule_detail where makebill_id in (select makebill_id from pub_makebillrule where iBillId in (select id from bill_base where cBillNo='%s' and tenant_id='%s' ))"),
    //DELETE_PUB_MAKEBILLRULE("delete from pub_makebillrule where iBillId in (select id from bill_base where cBillNo='%s' and tenant_id='%s' )"),
    DELETE_BILL_BASE("delete from bill_base where cBillNo='%s' and tenant_id='%s'"),
    DELETE_PUB_REF("delete from pub_ref where code='%s'");


    private final String sql;
    CommonDelReferSQL(String sql){
        this.sql = sql;
    }
    public String getSql(){
        return this.sql;
    }
}